package other;

public class Test04 {
    public static void main(String[] args) {
//        int[] startTime = {1, 2, 3};
//        int[] endTime = {3, 2, 7};
        int[] startTime = {4};
        int[] endTime = {4};
        System.out.println(busyStudent(startTime, endTime, 4));
    }

    public static int busyStudent(int[] startTime, int[] endTime, int queryTime) {
        int ans = 0;
        for (int i = 0; i < endTime.length; i++) {
            for (int t = startTime[i]; t <= endTime[i]; t++) {
                if (t == queryTime) {
                    ans++;
                }
            }
        }

        return ans;
    }
}
